package com.safety51.bootstrap.demo.domain.student;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 * Created by liuyuancheng on 2021/9/3  <br/>
 *
 * @author liuyuancheng
 */
@Service
@Slf4j
public class RedisService {

    @Autowired
    private StringRedisTemplate template;

    public String operations(){
        template.opsForValue().set("test","test1");
        return template.opsForValue().get("test");
    }
}
